PROGRAM greater
IMPLICIT NONE
REAL :: x,y,z

WRITE (*,*), 'Enter length of side 1:'; READ *, x  !Reading the values from the user
WRITE (*,*), 'Enter length of side 2:'; READ *, y
WRITE (*,*), 'Enter length of side 3:'; READ *, z

IF ( 2*MAX(x,y,z) < x+y+z ) THEN ! if true then the sides form a triangle
  IF (x/=y .AND. y/=x .AND. z/=x) THEN
    WRITE (*,*),'It is a SCALENE Triangle'
  ELSE IF (x==y .AND. y==x .AND. z==x) THEN
    WRITE (*,*),'It is an EQILATERAL Triangle'
  ELSE
    WRITE (*,*),'It is an ISOSCELES Triangle'
  END IF
ELSE
  WRITE (*,*),'The sides cannot form a Triangle'
END IF
END PROGRAM

